﻿function changeCheckState() {
    try {
        var frm = document.forms[0];
        var i = 0;
        for (i = 0; i < frm.length; i++) {
            if (frm.elements[i].id.indexOf('CheckBoxItem') != -1) {
                if (document.getElementById(frm.elements[i].id) != null) {
                    if (frm.elements[i].checked == false) {
                        frm.elements[i].checked = true;
                    } else {
                        frm.elements[i].checked = false;
                    }
                }
            }
        }
    } catch (err) { }
}